Various arrangements of magnetic sensors are used to measure the position of a magnet. For example, magnetic sensors can be arranged to determine a position of a magnet in one, two, or three dimensions. Example magnetic sensors include magnetoresistive sensors and Hall effect sensors.